diff --git a/system/database/drivers/postgre/postgre_forge.php b/system/database/drivers/postgre/postgre_forge.php
index f86ba2d..7368b94 100644
--- a/system/database/drivers/postgre/postgre_forge.php
+++ b/system/database/drivers/postgre/postgre_forge.php
@@ -63,32 +63,13 @@
 	}
 
 	// --------------------------------------------------------------------
-
+	
 	/**
-	 * Create Table
-	 *
-	 * @access	private
-	 * @param	string	the table name
-	 * @param	array	the fields
-	 * @param	mixed	primary key(s)
-	 * @param	mixed	key(s)
-	 * @param	boolean	should 'IF NOT EXISTS' be added to the SQL
-	 * @return	bool
+	 * Process Fields
 	 */
-	function _create_table($table, $fields, $primary_keys, $keys, $if_not_exists)
+	function _process_fields($fields, $primary_keys=array())
 	{
-		$sql = 'CREATE TABLE ';
-
-		if ($if_not_exists === TRUE)
-		{
-			// PostgreSQL doesn't support IF NOT EXISTS syntax so we check if table exists manually
-			if ($this->db->table_exists($table))
-			{
-				return TRUE;
-			}
-		}
-
-		$sql .= $this->db->_escape_identifiers($table)." (";
+		$sql = '';
 		$current_field_count = 0;
 
 		foreach ($fields as $field=>$attributes)
@@ -184,6 +165,38 @@
 				$sql .= ',';
 			}
 		}
+		
+		return $sql;
+	}
+
+	// --------------------------------------------------------------------
+
+	/**
+	 * Create Table
+	 *
+	 * @access	private
+	 * @param	string	the table name
+	 * @param	array	the fields
+	 * @param	mixed	primary key(s)
+	 * @param	mixed	key(s)
+	 * @param	boolean	should 'IF NOT EXISTS' be added to the SQL
+	 * @return	bool
+	 */
+	function _create_table($table, $fields, $primary_keys, $keys, $if_not_exists)
+	{
+		$sql = 'CREATE TABLE ';
+
+		if ($if_not_exists === TRUE)
+		{
+			// PostgreSQL doesn't support IF NOT EXISTS syntax so we check if table exists manually
+			if ($this->db->table_exists($table))
+			{
+				return TRUE;
+			}
+		}
+
+		$sql .= $this->db->_escape_identifiers($table)." (";
+		$sql .= $this->_process_fields($fields, $primary_keys);
 
 		if (count($primary_keys) > 0)
 		{
@@ -249,40 +262,25 @@
 	 * @param	string	the field after which we should add the new field
 	 * @return	object
 	 */
-	function _alter_table($alter_type, $table, $column_name, $column_definition = '', $default_value = '', $null = '', $after_field = '')
-	{
-		$sql = 'ALTER TABLE '.$this->db->_protect_identifiers($table)." $alter_type ".$this->db->_protect_identifiers($column_name);
+ 	function _alter_table($alter_type, $table, $fields, $after_field = '')
+ 	{
+ 		$sql = 'ALTER TABLE '.$this->db->_protect_identifiers($table)." $alter_type ";
 
-		// DROP has everything it needs now.
-		if ($alter_type == 'DROP')
-		{
-			return $sql;
-		}
+ 		// DROP has everything it needs now.
+ 		if ($alter_type == 'DROP')
+ 		{
+ 			return $sql.$this->db->_protect_identifiers($fields);
+ 		}
 
-		$sql .= " $column_definition";
+ 		$sql .= $this->_process_fields($fields);
 
-		if ($default_value != '')
-		{
-			$sql .= " DEFAULT \"$default_value\"";
-		}
+ 		if ($after_field != '')
+ 		{
+ 			$sql .= ' AFTER ' . $this->db->_protect_identifiers($after_field);
+ 		}
 
-		if ($null === NULL)
-		{
-			$sql .= ' NULL';
-		}
-		else
-		{
-			$sql .= ' NOT NULL';
-		}
-
-		if ($after_field != '')
-		{
-			$sql .= ' AFTER ' . $this->db->_protect_identifiers($after_field);
-		}
-
-		return $sql;
-
-	}
+ 		return $sql;
+ 	}
 
 	// --------------------------------------------------------------------
 
@@ -301,8 +299,6 @@
 		$sql = 'ALTER TABLE '.$this->db->_protect_identifiers($table_name)." RENAME TO ".$this->db->_protect_identifiers($new_table_name);
 		return $sql;
 	}
-
-
 }
 
 /* End of file postgre_forge.php */
